package org.cfan.seckill.Exception;

/**
 * @author maweijun
 * @description
 * @create 17/7/11
 */

public class SeckillException extends RuntimeException{
    private String msg; //错误消息
    private String errorCode;   //异常码
    private Throwable throwable;

    public SeckillException() {
        super();
    }

    public SeckillException(String msg) {
        super(msg);
        this.msg = msg;

    }

    public SeckillException(String msg, Throwable throwable) {
        super(msg, throwable);
        this.msg = msg;
        this.throwable = throwable;
    }

    public SeckillException(String msg, String errorCode) {
        this(msg, null, errorCode);
    }

    public SeckillException(String msg, Throwable throwable, String errorCode) {
        super(msg);
        this.msg = msg;
        this.throwable = throwable;
        this.errorCode = errorCode;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    public Throwable getThrowable() {
        return throwable;
    }

    public void setThrowable(Throwable throwable) {
        this.throwable = throwable;
    }
}
